1. Field of the Invention
The present invention relates to a method, system, and program for accessing a file in a file system by processing a data structure indicating the presence of preexisting files having the same name as a file to access.
2. Description of the Related Art
In data storage systems, before a file is stored, the file system is searched to determine if there is already a file having the name of the file to store. The file system includes the logical structures and software routines used to control access to files stored on a non-volatile storage medium, such as a hard disk drive, tape, optical disk, etc. In a file system, the files are stored in directories which provide a hierarchical arrangement of data. Each file or directory on the media can be uniquely identified using two pieces of information: its filename and the path in the directory that is traversed to access the file. The are various file systems in use (FAT, Unix, and ISO9660 and UDF for CDROMs and DVD devices).
Each file representation exists in a directory structure specific to its file system. To add a file to the file system, the directory must be searched to determine if the file already exists on the media. These directory access operations can have a significant impact on performance because storage media such as hard disk drives, tape, and optical disks are relatively slow devices due to the need to mechanically move the read head to different locations in the storage medium. In fact, such disk read operations can consume significant time.
One current solution to this problem is to maintain a list or database table of all file names in the file system. In this way, when a file write request is received, the list can be checked to determine if the file to store or update is already in the file system. Such an approach avoids the burdensome operation of expending time doing I/O operations to search the file system. One problem with this approach is that the data structure to store the file names can be particularly large, especially with file systems that support long file names, e.g., 256 characters long, and increasing. As the storage capacity increases and the file name length increases, the usefulness of this technique decreases because the table needed to store the name of each file may increase to a point where it is no longer feasible to maintain in cache. In such case, the table would have to be stored on the non-volatile storage medium, and have to be accessed using the slower performing disk drive actuator and head.
Thus, there is a need in the art for an improved, method, system, and program for determining the current files in the file system.